package com.verbetia.mbrainz.search;

public class ResultItem {
	
	public String title;
	public String artist;
	public String album;
	public String asin;
	public float score;
	
	static ResultItem CreateItem(String title, String artist, float score)
	{
		ResultItem item = new ResultItem();
		item.setArtist(artist);
		item.setTitle(title);
		item.setScore(score);
		
		return item;
		
	}
	
	static ResultItem CreateItem(String title, String artist, String album, String asin, float score)
	{
		ResultItem item = new ResultItem();
		item.setArtist(artist);
		item.setTitle(title);
		item.setScore(score);
		item.setAlbum(album);
		item.setAsin(asin);
		
		return item;
		
	}
	
	
	
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getArtist() {
		return artist;
	}
	public void setArtist(String artist) {
		this.artist = artist;
	}
	public float getScore() {
		return score;
	}
	public void setScore(float score) {
		this.score = score;
	}
	
	public String getAlbum() {
		return album;
	}
	public void setAlbum(String album) {
		this.album = album;
	}
	public String getAsin() {
		return asin;
	}
	public void setAsin(String asin) {
		if (asin==null)
		{	this.asin = "http://images.amazon.com/images/P/B00000I5G0.01.MZZZZZZZ.jpg";	
		} else 
		{
			this.asin = "http://images.amazon.com/images/P/" + asin;
			this.asin += ".01.MZZZZZZZ.jpg";
		}
	}
	
	public String toString()
	{
		String ret = this.getTitle() + " / " + this.getArtist() + " / " + this.getAlbum() + " / " + this.getAsin() + "\n"; 
		
		return ret;
		
		
	}
	
}